<?php

/**
 * @author    1054229380@qq.com
 * @since    2017-7-3
 * @desc 时间类
 **/
class time
{

    /**
     * 获取毫秒时间
     **/
    public static function getMicroTime()
    {
        $nowtime = explode(" ", microtime());
        //e($nowtime);
        $currTime = $nowtime[1] + $nowtime[0];
        return $currTime;
    }

    /**
     * 获取当前时间
     **/
    public static function getCurrTime($getType = '0')
    {
        date_default_timezone_set('Asia/Shanghai');
        if ($getType == "0") {
            $currTime = date("Y-m-d H:i:s");
        } else if ($getType == "1") {
            $currTime = time();
        }
        return $currTime;
    }

}

?>